@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">

            <div class="row">
                <div class="col-sm-6 b-r">
                            <#input id="names" name="姓名" underline="true"/>
                            <#input id="department" name="卡号" underline="true"/>
                </div>

                <div class="col-sm-6">
                            <#input id="starttime" name="开始时间" underline="true"/>
                            <#input id="stoptime" name="结束时间" underline="true"/>
<!--
                            <#input id="model" name="门号" underline="true"/>
-->
                </div>
                <div class="col-sm-12" id="checkbox">

                </div>
            </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CarInfoDlg.addSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CarInfoDlg.close()"/>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/doorCars/car/car_info.js"></script>
<script>
    laydate.render({
        elem: '#starttime',
        type: 'datetime',
        choose:function (datas) {
            alert(datas);
        }
    });
    laydate.render({
        elem: '#stoptime',
        type: 'datetime',
        choose:function (datas) {
            alert(datas);
        }
    });
    var arr = new Array();
    $.ajax({
        url: "/device/list",//获取数据的URL
        type: "Get",//HTTP请求方法
        async: false,
        success: function (data) {
            for (var i=0; i<data.length;i++){
                $("#checkbox").append(" <p style='display:inline-block; width: 20%;'><input type='checkbox' name='category' value='"+data[i].name+"' />"+data[i].name+"</p>");
            }

        }
    });


</script>
@}
